
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>CAP理论 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="ch9.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    译者
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="ch0.html">
            
                <a href="ch0.html">
            
                    
                    0. 系统设计面试指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="ch1.html">
            
                <a href="ch1.html">
            
                    
                    1. 设计类似TinyURL的短链服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="ch2.html">
            
                <a href="ch2.html">
            
                    
                    2. 设计 Pastebin
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="ch3.html">
            
                <a href="ch3.html">
            
                    
                    3. 设计Instagram
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="ch4.html">
            
                <a href="ch4.html">
            
                    
                    4. 设计Dropbox
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="ch5.html">
            
                <a href="ch5.html">
            
                    
                    5. 设计Facebook Messager
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="ch7.html">
            
                <a href="ch7.html">
            
                    
                    7. 设计YouTube或Netflix
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="ch9.html">
            
                <a href="ch9.html">
            
                    
                    9.设计API限流器
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.10" data-path="ch23.html">
            
                <a href="ch23.html">
            
                    
                    CAP理论
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >CAP理论</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="cap&#x7406;&#x8BBA;">CAP&#x7406;&#x8BBA;</h2>
<p>CAP &#x5B9A;&#x7406;&#x6307;&#x51FA;&#xFF0C;&#x5206;&#x5E03;&#x5F0F;&#x8F6F;&#x4EF6;&#x7CFB;&#x7EDF;&#x4E0D;&#x53EF;&#x80FD;&#x540C;&#x65F6;&#x63D0;&#x4F9B;&#x4EE5;&#x4E0B;&#x4E09;&#x9879;&#x4E2D;&#x7684;&#x4E24;&#x9879;&#x4EE5;&#x4E0A; (CAP)&#xFF1A;&#x4E00;&#x81F4;&#x6027;&#x3001;&#x53EF;&#x7528;&#x6027;&#x548C;&#x5206;&#x533A;&#x5BB9;&#x9519;&#x6027;&#x3002;&#x8BBE;&#x8BA1;&#x4E00;&#x4E2A;&#x5206;&#x5E03;&#x5F0F;&#x7CFB;&#x7EDF;&#x65F6;&#xFF0C;CAP &#x4E4B;&#x95F4;&#x7684;&#x6743;&#x8861;&#x51E0;&#x4E4E;&#x662F;&#x9996;&#x8981;&#x8003;&#x8651;&#x7684;&#x4E8B;&#x60C5;&#x3002; CAP &#x7406;&#x8BBA;&#x5728;&#x8BBE;&#x8BA1;&#x5206;&#x5E03;&#x5F0F;&#x7CFB;&#x7EDF;&#x65F6;&#x6307;&#x5BFC;&#x6211;&#x4EEC;&#xFF0C;&#x4EE5;&#x4E0B;&#x4E09;&#x4E2A;&#x4E2D;&#x53EA;&#x80FD;&#x9009;&#x6EE1;&#x8DB3;&#x4E24;&#x4E2A;&#xFF1A;</p>
<p><strong>&#x4E00;&#x81F4;&#x6027;&#xFF1A;</strong></p>
<p>&#x6240;&#x6709;&#x8282;&#x70B9;&#x540C;&#x65F6;&#x770B;&#x5230;&#x76F8;&#x540C;&#x7684;&#x6570;&#x636E;&#x3002;&#x4E00;&#x81F4;&#x6027;&#x662F;&#x901A;&#x8FC7;&#x5728;&#x5141;&#x8BB8;&#x8FDB;&#x4E00;&#x6B65;&#x8BFB;&#x53D6;&#x4E4B;&#x524D;&#x66F4;&#x65B0;&#x51E0;&#x4E2A;&#x8282;&#x70B9;&#x6765;&#x5B9E;&#x73B0;&#x7684;&#x3002;</p>
<p><strong>&#x53EF;&#x7528;&#x6027;&#xFF1A;</strong></p>
<p>&#x6BCF;&#x4E2A;&#x8BF7;&#x6C42;&#x90FD;&#x4F1A;&#x83B7;&#x5F97;&#x6210;&#x529F;/&#x5931;&#x8D25;&#x7684;&#x54CD;&#x5E94;&#x3002;&#x53EF;&#x7528;&#x6027;&#x662F;&#x901A;&#x8FC7;&#x5728;&#x4E0D;&#x540C;&#x670D;&#x52A1;&#x5668;&#x4E4B;&#x95F4;&#x6570;&#x636E;&#x526F;&#x672C;&#x6765;&#x5B9E;&#x73B0;&#x3002;</p>
<p><strong>&#x5206;&#x533A;&#x5BB9;&#x9519;&#x6027;&#xFF1A;</strong></p>
<p>&#x7CFB;&#x7EDF;&#x5728;&#x6D88;&#x606F;&#x4E22;&#x5931;&#x6216;&#x90E8;&#x5206;&#x5931;&#x8D25;&#x65F6;&#x53EF;&#x4EE5;&#x7EE7;&#x7EED;&#x670D;&#x52A1;&#x3002;&#x5177;&#x6709;&#x5206;&#x533A;&#x5BB9;&#x9519;&#x6027;&#x7684;&#x7CFB;&#x7EDF;&#x53EF;&#x4EE5;&#x627F;&#x53D7;&#x4EFB;&#x610F;&#x6570;&#x91CF;&#x7684;&#x4E0D;&#x4F1A;&#x5BFC;&#x81F4;&#x6574;&#x4E2A;&#x7F51;&#x7EDC;&#x762B;&#x75EA;&#x7684;&#x7F51;&#x7EDC;&#x6545;&#x969C;&#x3002;&#x6570;&#x636E;&#x662F;&#x5728;&#x8282;&#x70B9;&#x548C;&#x7F51;&#x7EDC;&#x4E2D;&#x505A;&#x597D;&#x526F;&#x672C;&#xFF0C;&#x4EE5;&#x4FDD;&#x6301;&#x7CFB;&#x7EDF;&#x901A;&#x8FC7;&#x95F4;&#x6B47;&#x6027;&#x4E2D;&#x65AD;&#x542F;&#x52A8;&#x3002;</p>
<p><img src="img/ch23_1.png" alt=""></p>
<p>&#x6211;&#x4EEC;&#x65E0;&#x6CD5;&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;&#x6301;&#x7EED;&#x53EF;&#x7528;&#x7684;&#x5177;&#x6709;&#x987A;&#x5E8F;&#x4E00;&#x81F4;&#xFF0C;&#x5E76;&#x4E14;&#x53EF;&#x4EE5;&#x5BB9;&#x5FCD;&#x4EFB;&#x4F55;&#x5206;&#x533A;&#x6545;&#x969C;&#x7279;&#x70B9;&#x7684;&#x901A;&#x7528;&#x6570;&#x636E;&#x5B58;&#x50A8;&#x3002; &#x53EA;&#x80FD;&#x6784;&#x5EFA;&#x5177;&#x6709;&#x8FD9;&#x4E09;&#x4E2A;&#x5C5E;&#x6027;&#x4E2D;&#x7684;&#x4EFB;&#x610F;&#x4E24;&#x4E2A;&#x7684;&#x7CFB;&#x7EDF;&#x3002; &#x56E0;&#x4E3A;&#xFF0C;&#x4E3A;&#x4E86;&#x8FBE;&#x5230;&#x4E00;&#x81F4;&#x6027;&#xFF0C;&#x6240;&#x6709;&#x8282;&#x70B9;&#x90FD;&#x5E94;&#x8BE5;&#x4EE5;&#x76F8;&#x540C;&#x7684;&#x987A;&#x5E8F;&#x770B;&#x5230;&#x76F8;&#x540C;&#x7684;&#x66F4;&#x65B0;&#x3002;&#x4F46;&#x662F;&#x5982;&#x679C;&#x7F51;&#x7EDC;&#x51FA;&#x73B0;&#x5206;&#x533A;&#xFF0C;&#x5728;&#x5BA2;&#x6237;&#x7AEF;&#x4ECE;&#x8FC7;&#x671F;&#x5206;&#x533A;&#x4E2D;&#x8BFB;&#x53D6;&#x6570;&#x636E;&#x4E4B;&#x524D;&#xFF0C;&#x4E00;&#x4E2A;&#x5206;&#x533A;&#x4E2D;&#x7684;&#x66F4;&#x65B0;&#x53EF;&#x80FD;&#x4E0D;&#x4F1A;&#xFF0C;&#x5C06;&#x5176;&#x53D1;&#x9001;&#x5230;&#x5176;&#x4ED6;&#x5206;&#x533A;&#x3002; &#x552F;&#x4E00;&#x80FD;&#x505A;&#x7684;&#x5C31;&#x662F;&#x5E94;&#x5BF9;&#x8FD9;&#x79CD;&#x53EF;&#x80FD;&#x6027;&#x7684;&#x65B9;&#x6CD5;&#x662F;&#x505C;&#x6B62;&#x4E3A;&#x8FC7;&#x671F;&#x7684;&#x8BF7;&#x6C42;&#x63D0;&#x4F9B;&#x670D;&#x52A1;&#x5206;&#x533A;&#xFF0C;&#x4F46;&#x968F;&#x540E;&#x670D;&#x52A1;&#x4E0D;&#x518D;&#x662F;100% &#x53EF;&#x7528;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="ch9.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 9.设计API限流器">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"CAP理论","level":"1.10","depth":1,"previous":{"title":"9.设计API限流器","level":"1.9","depth":1,"path":"ch9.md","ref":"ch9.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"ch23.md","mtime":"2022-03-13T23:58:33.736Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-03-18T00:21:24.649Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

